import type { FormRules } from 'naive-ui'

export const createRules = (): FormRules => {
  return {
    name: [
      {
        required: true,
        message: '请输入菜单名称',
        trigger: 'blur',
      },
    ],
    enName: [
      {
        required: true,
        message: '请输入Name',
        trigger: 'blur',
      },
    ],
    permission: [
      {
        required: true,
        message: '请输入权限标识',
        trigger: 'blur',
      },
    ],
    path: [
      {
        required: true,
        message: '请输入path',
        trigger: 'blur',
      },
    ],
    component: [
      {
        required: true,
        message: '请输入文件路径',
        trigger: 'blur',
      },
    ],
    sortOrder: [
      {
        type: 'number',
        required: true,
        message: '请输入权重',
        trigger: 'blur',
      },
    ],
  }
}
